<div id="header">
	<h1>Edit User</h1>
</div>

<div class="colmask threecol">
	<div class="colmid">
		<div class="colleft">
			<div class="col1">
				<div class="form">
					<% form_for(@user) do |f| %>
						<%= f.error_messages %>

						<fieldset>
							<legend>Edit User</legend>
							<div>
								<%= f.label :name %>
								<%= f.text_field :name, :size => 40 %>
							</div>
							<div>
								<%= f.label :roles_mask, 'Role' %>
								<td><%= select(:user, :roles_mask, { "Administrator" => 0, "Moderator" => 1, "User" => 2 }) %>
							</div>
							<div>
								<label>&nbsp;</label>
								<%= f.submit 'Update' %>
							</div>
						</fieldset>
					<% end %>
				</div>
			</div>
			<div class="col2">
				<ul>
					<li><%= link_to "Vocabulary Words", vocabularies_path %></li>
					<li>Lessons</li>
					<li>Flash Cards</li>
					<li>Audio Files</li>
					<li>Video Clips</li>
				</ul>
			</div>
			<div class="col3">
				<ul>
					<% if User.find(session[:user_id]).is_Administrator? %>
						<li><%= link_to 'Create User', :controller => "users", :action => "new" %></li>
						<li>List Users</li>
					<% end %>
					<li><%= link_to 'Logout', :controller => "admin", :action => "logout" %></li>
				</ul>
				<p style="color: green"><%= notice %></p>
			</div>
		</div>
	</div>
</div>

<%= link_to 'Show', @user %> |
<%= link_to 'Back', users_path %>